﻿using DateModel.Typedef;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DateModel.Send.DataHeader
{
    public abstract class DataBaseSend : IDataBase
    {
        Operator operation;

        [Newtonsoft.Json.JsonProperty(PropertyName = "operation")]
        public String Operation
        {
            get
            {
                return operation.ToString();
            }

            set
            {
                if(!Enum.TryParse(value, out operation))
                { 
                    operation = Operator.undefine;
                }
            }
        }

        protected void SetOperation(Operator value)
        {
            operation = value;
        }
    }
}
